<template>
	<view class="content">
		<view class="jump-over" @tap="launchFlag()">跳过</view>
		<image class="img" :src="data" :style="{width:screenWidth+'px',height:screenHeight+'px'}"></image>
	</view>
</template>

<script>
	import henglang from '@/common/common_zb.js';
	export default {
		data() {
			return {
				data:'',
				nDot: 0, // 轮播图点
				isShowDot: false,
				screenWidth:'',
				screenHeight:'',
				timer:null
			}
		},
		methods: {
			launchFlag(){
				let that = this
				clearInterval(that.timer)
				uni.switchTab({
					url: '/pages/jewel/index/index'
				});
			},
		},
		onLoad() {
			let that = this
			henglang.post('App/getAppAd',{},false,function(res){
				if(res.data.code == 0){
					that.data = res.data.data
				}else{
					uni.switchTab({
						url: '/pages/jewel/index/index'
					});
				}
			});
			uni.getSystemInfo({
				success(res) {
					that.screenWidth = res.screenWidth
					that.screenHeight = res.screenHeight
				}
			})
			that.timer = setInterval(function() {
				uni.switchTab({
					url: '/pages/jewel/index/index'
				});
				clearInterval(that.timer)
			}, 5000);
		}
	}
</script>
<style>
	
	page,.content{
		overflow: hidden;
		width: 100%;
		height: 100%;
	}
	.jump-over{
		position: fixed;
		right: 40upx;
		line-height: 60upx;
		/* #ifdef APP-PLUS */
		top: calc(var(--status-bar-height) + 30px);
		/* #endif */
		/* #ifndef APP-PLUS */
		top: 60upx;
		/* #endif */
		height: 56upx;
		line-height: 56upx;
		width: 120upx;
		font-size: 26upx;
		background: rgba(0,0,0,0.6);
		z-index: 999;
		color: #ffffff;
		border-radius: 30upx;
		text-align: center;
	}
	.img{
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}
</style>
